﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    layui.use(['jquery', 'upload', 'form', 'laydate', 'common', 'optimizeSelectOption'], function () {
        var form = layui.form,
            $ = layui.$,
            common = layui.common,
            upload = layui.upload,
            laydate = layui.laydate;
        var keyValue = $.request("keyValue");
        //权限字段
        common.authorizeFields('adminform');
        var isUpload = false;
        var postData = {};
        //此处需修改
        //类型为时间时
        laydate.render({
            elem: '#F_EndTime'
            , btns: ['clear', 'now']
            , trigger: 'click',
            format: 'yyyy-MM-dd',
        });
        $(function () {
            common.ajax({
                url: '/SystemOrganize/SystemSet/GetFormJson',
                dataType: 'json',
                data: { keyValue: keyValue },
                async: false,
                success: function (data) {
                    common.val('adminform', data);
                    $('#F_EndTime').val(new Date(data.F_EndTime).Format("yyyy-MM-dd"));
                    $('#demo1').attr('src', data.F_Logo); //图片链接
                    common.setReadOnly('adminform');
                }
            });
            form.render();
        });
        wcLoading.close();
    });
</script>

<body>
    <div class="layuimini-container">
        <div class="layuimini-main">
            <div class="layui-form layuimini-form" lay-filter="adminform">
                <div class="layui-form-item">
                    <div class="layui-col-md6 layui-col-xs6layui-hide">
                        <label class="layui-form-label">项目名称</label>
                        <div class="layui-input-block">
                            <input type="text" id="F_ProjectName" name="F_ProjectName" autocomplete="off" lay-verify="required" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-col-md6 layui-col-xs6layui-hide">
                        <label class="layui-form-label">公司名称</label>
                        <div class="layui-input-block">
                            <input type="text" id="F_CompanyName" name="F_CompanyName" autocomplete="off" lay-verify="required" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-md6 layui-col-xs6layui-hide">
                        <label class="layui-form-label">联系人</label>
                        <div class="layui-input-block">
                            <input type="text" id="F_PrincipalMan" name="F_PrincipalMan" autocomplete="off" lay-verify="required" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-col-md6 layui-col-xs6layui-hide">
                        <label class="layui-form-label">联系方式</label>
                        <div class="layui-input-block">
                            <input type="text" id="F_MobilePhone" name="F_MobilePhone" autocomplete="off" lay-verify="required" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-md6 layui-col-xs6layui-hide">
                        <label class="layui-form-label" style="margin-top: 50px;">Logo图标</label>
                        <div class="layui-input-block">
                            <input class="layui-hide" hidden type="text" id="F_Logo" name="F_Logo">
                            <div class="layui-upload-list">
                                <img class="layui-upload-img" id="demo1">
                                <p id="demoText"></p>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-md6 layui-col-xs6layui-hide">
                        <label class="layui-form-label">Logo编号</label>
                        <div class="layui-input-block">
                            <input type="text" id="F_LogoCode" name="F_LogoCode" autocomplete="off" lay-verify="required" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-md6 layui-col-xs6layui-hide">
                        <label class="layui-form-label">系统账户</label>
                        <div class="layui-input-block">
                            <input type="text" id="F_AdminAccount" name="F_AdminAccount" autocomplete="off" readonly lay-verify="required" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-col-md6 layui-col-xs6layui-hide">
                        <label class="layui-form-label">系统密码</label>
                        <div class="layui-input-block">
                            <input type="password" id="F_AdminPassword" name="F_AdminPassword" autocomplete="off" lay-verify="required" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-md6 layui-col-xs6layui-hide">
                        <label class="layui-form-label">有效</label>
                        <div class="layui-input-block">
                            <input type="checkbox" name="F_EnabledMark" id="F_EnabledMark" checked="" value="true" title="有效标识">
                        </div>
                    </div>
                    <div class="layui-col-md6 layui-col-xs6layui-hide">
                        <label class="layui-form-label">到期时间</label>
                        <div class="layui-input-block">
                            <input type="text" id="F_EndTime" name="F_EndTime" autocomplete="off" lay-verify="required" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-md6 layui-col-xs6layui-hide">
                        <label class="layui-form-label">域名</label>
                        <div class="layui-input-block">
                            <textarea id="F_HostUrl" name="F_HostUrl" class="layui-textarea" placeholder="请输入域名"></textarea>
                        </div>
                    </div>
                    <div class="layui-col-md6 layui-col-xs6layui-hide">
                        <label class="layui-form-label">备注</label>
                        <div class="layui-input-block">
                            <textarea id="F_Description" name="F_Description" class="layui-textarea" placeholder="请输入备注"></textarea>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>

